package com.yuxi.searchExt;

import com.yuxi.model.Product;
import com.yuxi.model.ProductType;
import com.yuxi.search.ProductSearch;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.List;


/**
 * @author sunke
 * @Date 2023-10-13 10:05:04
 * @description ProductSearchExt      产品
 */
@Data
@Accessors(chain = true)
@ApiModel("产品ProductSearchExt")
public class ProductSearchExt extends ProductSearch<ProductSearchExt> {


    private List typeIds;
    @ApiModelProperty(value = "分类类型 0:产品分类:product_type,1:代理品牌:Brand")
    private List typeFlagIn;
    private String upIdEq;

    public static ProductSearchExt getInstance() {
        return new ProductSearchExt();
    }

    public ProductSearchExt setTypeIds(List typeIds) {
        this.typeIds = typeIds;
        setInField(Product.PRODUCT_TYPE_ID, typeIds);
        return this;
    }

    public ProductSearchExt setUpIdEq(String upIdEq) {
        this.upIdEq = upIdEq;
        setEqualField(ProductType.UP_ID, upIdEq);
        return this;
    }

    public ProductSearchExt setTypeFlagIn(List typeFlagIn) {
        this.typeFlagIn = typeFlagIn;
        setInField(ProductType.TYPE_FLAG, typeFlagIn);
        return this;
    }

    @Override
    public ProductSearchExt getSubThis() {
        return this;
    }

}

